import random
import cv2
import numpy as np

wight = 100
hight = 100
img = np.zeros((hight,wight,3), np.uint8)

blue=0
green=0
red=0
while True:
    blue = random.randint(0, 255)
    green = random.randint(0, 255)
    red = random.randint(0, 255)
    img[:, :] = (blue, green, red)
    cv2.imshow('img', img)
    key = cv2.waitKey(1000)
    if key == ord('q'):
        break
